<?php
/**
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake.libs.view.templates.layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo $this->Html->charset(); ?>
<title><?php echo $title_for_layout; ?> - <?php echo __('CTV'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
echo $this->Html->meta('icon');
echo $this->Html->css(array('bootstrap','bootstrap-responsive', 'global', 'admin'));
echo $this->Html->script(array('lib/jquery.js','lib/jquery-ui.js','lib/bootstrap.js'));
echo $scripts_for_layout;
?>
<style>
  body {
    padding-top: 60px;
    padding-bottom: 40px;
  }
  </style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> 
					<span class="icon-bar"></span> 
					<span class="icon-bar"></span> 
					<span class="icon-bar"></span>
				</a>
				<?php 
					echo $this->Html->link(__('Collab'), 
						array('controller' => 'users', 'action' => 'dashboard', 'admin' => true), 
						array('class' => 'brand'))
				?> 
				<div class="nav-collapse">
					<ul class="nav">
						<li><?php echo $this->Html->link(__('Home'), array('controller' => 'users', 'action' => 'dashboard', 'admin' => true))?></li>
						<li><?php echo $this->Html->link(__('Users'), array('controller' => 'users', 'action' => 'index','admin' => true))?></li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Categories') ?><b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php 
									echo $this->Html->link(__('Category Index'), array(
										'controller' => 'categories', 
										'action' => 'index', 
										'admin' => true)
								)?></li>
								<li><?php 
									echo $this->Html->link(__('Set Category to Manager'), array(
										'controller' => 'categories', 
										'action' => 'assign', 
										'admin' => true)
								)?></li>
							</ul>
						</li>
						<li><?php echo $this->Html->link(__('Articles'), array('controller' => 'articles','action' => 'index', 'admin' => true))?></li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('System')?><b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo $this->Html->link(__('Site'), array('admin'=> true, 'controller'=> 'settings', 'action'=> 'config', 'site'))?></li>
								<li><?php echo $this->Html->link(__('Mail'), array('admin'=> true, 'controller'=> 'settings', 'action'=> 'config', 'mail'))?></li>
							</ul>
						</li>
					</ul>
				</div>
				<div class="btn-group pull-right">
					<a href="#" data-toggle="dropdown" class="btn dropdown-toggle"> 
						<i class="icon-user"></i> 
						<?php echo $this->Session->read('Auth.User.username')?>
						<span class="caret"></span>
					</a>
					<ul class="dropdown-menu">
						<li><?php echo $this->Html->link(__('Profile'), array('controller' => 'users', 'action' => 'profile', 'admin' => true));?></li>
						<li class="divider"></li>
						<li><?php echo $this->Html->link(__('Log Out'), array('controller' => 'users', 'action' => 'logout', 'admin' => true));?></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	
	<div class="container">
		<?php
			echo $this->Session->flash();
			echo $content_for_layout;
		?>
	</div>
	<?php //echo $this->element('sql_dump'); ?>
</body>
</html>
